package com.lynn.salary.service.impl;

import java.util.List;
import java.util.Map;

import com.lynn.salary.entity.EmpRole;
import com.lynn.salary.service.IEmpRoleService;

public class EmpRoleService extends BaseService implements IEmpRoleService {

	public String getByRoleName(String roleName) throws Exception{
		List<Map<String, Object>> re = dao.getPartList(EmpRole.class, new String[]{"empId","$roleId#name"}, "$$a2.name='"+roleName+"'");
		if (re != null && re.size() > 0) {
			return (String) re.get(0).get("empId");
		}
		return null;
	}

}
